//
//  UIBarButtonItem+Extension.swift
//  03.微博
//
//  Created by 蔡承毅 on 16/9/27.
//  Copyright © 2016年 IOS. All rights reserved.
//

import UIKit

extension UIBarButtonItem{
    convenience init(name: String) {
        let button = UIButton()
        button.setImage(UIImage(named:name), for: .normal)
        button.setImage(UIImage(named: name + "_highlighted"), for: .highlighted)
        
        button.sizeToFit()
        self.init(customView: button)
    }
}
